<?php

!defined('DEBUG') AND exit('Access Denied.');

$action = param(1,'list');

if ($action == 'list') {
	$shoplist = shop_read_all();

	include _include(ADMIN_PATH . "view/htm/shop_list.htm");
} elseif ($action == 'review') {
	if ($method == 'GET') {
		$shoplist = shop_read_all(0);

		include _include(ADMIN_PATH . "view/htm/shop_review.htm");
	} elseif ($method == 'POST') {
		$sid = param('sid', 0);
		$type = param('type', 'null');

		if ($sid == 0) {
			message(-1, "非法操作：sid");
		}

		if ($type == 'null') {
			message(-1, "非法操作:type");
		}

		if ($type == 'tg') {
			shop_review($sid, 1);
			message(0, '审核成功');
		} elseif ($type == 'jj') {
			shop_review($sid, -1);
			message(0, '拒绝成功');
		}
	}
	
}

?>